package com.example.androidtest1.proj.util;

import java.util.List;
import java.util.Scanner;

public class Application {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int[] arr = new int[4];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = cin.nextInt();
        }
        List<String> exp = new RandSearcherImp().search(arr);
        if (exp != null) {
            BinaryTree tree = BinaryTree.createBinaryTree(exp);
            StringBuffer buffer = new StringBuffer();
            tree.midVisit(buffer);
            //“+”是加号,“-”是减号,“×”是乘号,“÷”是除号。
            System.out.println(buffer.toString().replaceAll("\\*", "×").replaceAll("\\/", "÷"));
        } else {
            System.out.println("No solution");
        }
    }
}
